﻿using com.fmtx.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace com.fmtx.IDal
{
    public interface IArticle : IBase<Article>
    {
        /// <summary>
        /// 根据类型查询
        /// </summary>
        /// <param name="typeId"></param>
        /// <returns></returns>
        IList<Article> Query();
        /// <summary>
        /// 根据类型查询
        /// </summary>
        /// <param name="typeId"></param>
        /// <returns></returns>
        IList<Article> Query(int typeId);

        /// <summary>
        /// 分页获取已通过审核且isview=true的文章
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        IList<Article> Query(int index, int size);

        /// <summary>
        /// 查询最热门游记
        /// </summary>
        /// <param name="index">起始页</param>
        /// <param name="size">大小</param>
        /// <param name="title">标题</param>
        /// <param name="keyword">关键字</param>
        /// <param name="address">地址名称</param>
        /// <returns></returns>
        IList<Article> QureyHost(int index, int size, string title, string keyword);

        /// <summary>
        /// 查询最赞游记
        /// </summary>
        /// <param name="index">起始页</param>
        /// <param name="size">大小</param>
        /// <param name="title">标题</param>
        /// <param name="keyword">关键字</param>
        /// <param name="address">地址名称</param>
        /// <returns></returns>
        IList<Article> QureyPraise(int index, int size, string title, string keyword);

        /// <summary>
        /// 获取城市或者地点相关的最新游记
        /// </summary>
        /// <param name="size"></param>
        /// <param name="uid"></param>
        /// <param name="地址名称"></param>
        /// <returns></returns>
        IList<Article> Query(int size, int uid, string address);

        /// <summary>
        /// 最热游记
        /// </summary>
        /// <param name="size"></param>
        /// <returns></returns>
        IList<Article> QueryHost(int size);

        /// <summary>
        /// 最新游记
        /// </summary>
        /// <param name="size"></param>
        /// <returns></returns>
        IList<Article> QueryNew(int size);

        /// <summary>
        /// 最热游记
        /// </summary>
        /// <param name="size"></param>
        /// <returns></returns>
        IList<Article> QueryPraise(int size);

        /// <summary>
        /// 用户中心文章列表
        /// </summary>
        /// <param name="lastid"></param>
        /// <param name="size"></param>
        /// <param name="uid"></param>
        /// <param name="title"></param>
        /// <param name="ismy">是否本人</param>
        /// <returns></returns>
        IList<Article> Query(int lastid,int size,int typeid, int uid, string title,bool ismy);

        /// <summary>
        /// 来源地址
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        bool HasSource(string source);

        /// <summary>
        /// 后台使用翻页获取文章列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="name"></param>
        /// <param name="cityid"></param>
        /// <param name="placeid"></param>
        /// <returns></returns>
        IList<Article> Query(int index, int size, string title,Approved statu,int uid, int cityid, int placeid,out int count);

        /// <summary>
        /// 获取文章总项数
        /// </summary>
        /// <returns></returns>
        int GetCount();

        /// <summary>
        /// 获取相关可用文章
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="keyword"></param>
        /// <param name="cityid"></param>
        /// <param name="placeid"></param>
        /// <param name="coutryid"></param>
        /// <param name="provincid"></param>
        /// <returns></returns>
        IList<Article> Query(int index, int size, string keyword, int cityid, int placeid, int coutryid, int provincid,ref int count);

        /// <summary>
        /// 获取关键字相关的游记
        /// </summary>
        /// <param name="size"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        IList<Article> QueryByKeyword(int size, string keyword);
    }
}
